If you're lucky enough to have a friend who is by your side no matter what, you have a friend who will stick with you through thick and thin.
In this phrase, "thick and thin" refer to whatever obstacles or challenges life throws at you. Rather than simply meaning "good and bad," the phrase conveys the idea of perseverance "no matter what." The expression is over 600 years old and appears in Geoffrey Chaucer's The Canterbury Tales. It originally described traveling through the English countryside, where "thick" referred to dense thickets and tangled underbrush, and "thin" referred to sparse woodland or open ground that was easier to cross.